﻿using System;
using System.Collections.Generic;
using System.Text;
using SchEdu.Framework.DataModel;

namespace SchEdu.Framework.Algorithm
{
    public class ShopFlowAllocator : Allocator
    {
        public ShopFlowAllocator()
        {
        }

        public override void AllocateActivities(ActivityCollection activities)
        {

            //foreach (Allocation activity in activities)
            //{
            //    activity.WorkCenterRow.AvailabilityDate = 0;
            //    activity.OrderRow.AvailabilityDate = 0;
            //}
                
            //foreach (SchEduDataSet.ActivityRow activity in activities)
            //{
            //    activity.StartDate = Math.Max(activity.WorkCenterRow.AvailabilityDate,activity.OrderRow.AvailabilityDate);
            //    activity.EndDate = activity.StartDate + activity.ProcessingTime;
            //    activity.WorkCenterRow.AvailabilityDate = activity.EndDate;
            //    activity.OrderRow.AvailabilityDate = activity.EndDate;

            //}
        }

    }
}
